<!-- <div style="width:80%; left:10%;position: relative">
<?php echo $this->partial('/index/partial/progress.phtml',array('progress'=>$this->progress));?>
</div>
<div class="matrix">
	<table id="matrix">
		<?php
		$numbers = $this->numbers;
		$count_summary = 0;
		for($j=0;$j<5; $j++){
			echo "<tr>";
			for($i=0;$i<10;$i++){
				$id = (int)((string)$j.(string)$i);
				$numb = $numbers['ranges'][$id];
				$count_summary += $numb['count']/200;
				echo('<td><div class="progressbar" id="'.$id.'"></div><div class="range" rel=\'{"id":"'.$id.'","count":"'.$numb['count'].'","range_top":"' .$numb['range_top'].'","range_bot":"'.$numb['range_bot'].'"}\'>'.$numb['range_top'] . ' ' . $numb['range_bot'].'</div></td>');
			}
			echo "</div></td></tr>";
		}
		?>	
	</table>
</div> -->


<input type="text" id="test" value="123"/>
<script type="text/javascript">
	selective = $('#test').selective({
						countNums:7, 
						onSelectorClick: function(id, result){
							$.ajax({
								url: '/numbers/check-available',
								data: {dig:id, number: result},
								type: 'post',
								success: function(response){
													data = $.parseJSON(response);
													console.log(data);
													selective.setAvailableNums({digOrder:data.digOrder, nums: data.nums});
								}
							});
							
							//selective.setAvailableNums({digOrder:0, nums: [0,1]});
							return true;
						},
						whenSelected:function(result){
							$.ajax({
								url: '/numbers/check-available',
								data: {number:result},
								type: 'post',
								success: function(response){
													data = $.parseJSON(response);
													console.log(data);
													//selective.setAvailableNums({digOrder:data.digOrder, nums: data.nums});
								}
							});
						}
	});
						
	
</script>
<?php echo $this->partial('/index/js/script.phtml', array());?>